<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>offset和offLeft</title>
		<style type="text/css">
			*{
				margin: 0;
				padding: 0%;
			}
			#father{
				width: 400px;
				height: 400px;
				background-color: red;
			}
			#son {
				width: 200px;
				height: 100px;
				background-color: #0000FF;
			}
		</style>
	</head>
	<body>
		<div id="father">
			<div id="son"></div>
		</div>
		<script type="text/javascript">
			let son = document.getElementById('son');
			console.log(son.offsetParent);
		</script>
	</body>
</html>